package com.kob.backend.controller.shopcarts;

import com.kob.backend.service.shopcarts.ShopcartsAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class ShopcartsAddController {
    @Autowired
    private ShopcartsAddService shopcartsAddService;
    @PostMapping("/shopcarts/add/")
    public void addshopcarts(@RequestParam Map<String,String> map)
    {
        Integer userid = Integer.parseInt(map.get("userid"));
        Integer productid = Integer.parseInt(map.get("productid"));
        shopcartsAddService.addshopcarts(userid,productid);
    }
}
